cmake_minimum_required(VERSION 3.2)


# 项目信息
project (lh_trans)
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")

#程序名字
set(prg01_name live555)

# 程序文件变量
set(prg01_inc_dir PUBLIC)
set(prg01_src)

set(temp_ base_env_)
set(${temp_}dir BasicUsageEnvironment)
set(${temp_}src ${${temp_}dir}/BasicTaskScheduler.cpp
                 ${${temp_}dir}/BasicUsageEnvironment0.cpp
                 ${${temp_}dir}/DelayQueue.cpp
                 ${${temp_}dir}/BasicHashTable.cpp
                 ${${temp_}dir}/BasicTaskScheduler0.cpp
                 ${${temp_}dir}/BasicUsageEnvironment.cpp)
list(APPEND prg01_src ${${temp_}src})
list(APPEND prg01_inc_dir ${${temp_}dir}/include)

set(temp_ groupsock_)
set(${temp_}dir groupsock)
set(${temp_}src ${${temp_}dir}/GroupEId.cpp
                ${${temp_}dir}/Groupsock.cpp
                ${${temp_}dir}/GroupsockHelper.cpp
                ${${temp_}dir}/IOHandlers.cpp
                ${${temp_}dir}/NetAddress.cpp
                ${${temp_}dir}/inet.c
                ${${temp_}dir}/NetInterface.cpp)
list(APPEND prg01_src ${${temp_}src})
list(APPEND prg01_inc_dir ${${temp_}dir}/include)

set(temp_ live_media_)
set(${temp_}dir liveMedia)
set(${temp_}src ${${temp_}dir}/AC3AudioFileServerMediaSubsession.cpp
                ${${temp_}dir}/AC3AudioRTPSink.cpp
                ${${temp_}dir}/ADTSAudioFileServerMediaSubsession.cpp
                ${${temp_}dir}/ADTSAudioFileSource.cpp
                ${${temp_}dir}/AMRAudioFileServerMediaSubsession.cpp
                ${${temp_}dir}/AMRAudioFileSink.cpp
                ${${temp_}dir}/AMRAudioFileSource.cpp
                ${${temp_}dir}/AMRAudioRTPSource.cpp
                ${${temp_}dir}/AMRAudioSource.cpp
                ${${temp_}dir}/AudioInputDevice.cpp
                ${${temp_}dir}/AudioRTPSink.cpp
                ${${temp_}dir}/Base64.cpp
                ${${temp_}dir}/BasicUDPSink.cpp
                ${${temp_}dir}/BasicUDPSource.cpp
                ${${temp_}dir}/ByteStreamFileSource.cpp
                ${${temp_}dir}/ByteStreamMultiFileSource.cpp
                ${${temp_}dir}/DigestAuthentication.cpp
                ${${temp_}dir}/DVVideoRTPSink.cpp
                ${${temp_}dir}/DVVideoStreamFramer.cpp
                ${${temp_}dir}/EBMLNumber.cpp
                ${${temp_}dir}/FramedFileSource.cpp
                ${${temp_}dir}/FramedFilter.cpp
                ${${temp_}dir}/FramedSource.cpp
                ${${temp_}dir}/GenericMediaServer.cpp
                ${${temp_}dir}/GSMAudioRTPSink.cpp
                ${${temp_}dir}/H261VideoRTPSource.cpp
                ${${temp_}dir}/H263plusVideoFileServerMediaSubsession.cpp
                ${${temp_}dir}/H263plusVideoRTPSink.cpp
                ${${temp_}dir}/H263plusVideoRTPSource.cpp
                ${${temp_}dir}/H264or5VideoFileSink.cpp
                ${${temp_}dir}/H264or5VideoRTPSink.cpp
                ${${temp_}dir}/H264or5VideoStreamDiscreteFramer.cpp
                ${${temp_}dir}/H264or5VideoStreamFramer.cpp
                ${${temp_}dir}/H264VideoFileServerMediaSubsession.cpp
                ${${temp_}dir}/H264VideoFileSink.cpp
                ${${temp_}dir}/H264VideoRTPSink.cpp
                ${${temp_}dir}/H264VideoRTPSource.cpp
                ${${temp_}dir}/H264VideoStreamDiscreteFramer.cpp
                ${${temp_}dir}/H264VideoStreamFramer.cpp
                ${${temp_}dir}/H265VideoFileServerMediaSubsession.cpp
                ${${temp_}dir}/H265VideoRTPSink.cpp
                ${${temp_}dir}/H265VideoStreamDiscreteFramer.cpp
                ${${temp_}dir}/H265VideoStreamFramer.cpp
                ${${temp_}dir}/HLSSegmenter.cpp
                ${${temp_}dir}/HMAC_SHA1.cpp
                ${${temp_}dir}/JPEG2000VideoRTPSink.cpp
                ${${temp_}dir}/JPEGVideoRTPSink.cpp
                ${${temp_}dir}/JPEGVideoRTPSource.cpp
                ${${temp_}dir}/JPEGVideoSource.cpp
                ${${temp_}dir}/Locale.cpp
                ${${temp_}dir}/MatroskaDemuxedTrack.cpp
                ${${temp_}dir}/MatroskaFile.cpp
                ${${temp_}dir}/MatroskaFileParser.cpp
                ${${temp_}dir}/Media.cpp
                ${${temp_}dir}/MediaSession.cpp
                ${${temp_}dir}/MediaSink.cpp
                ${${temp_}dir}/MediaSource.cpp
                ${${temp_}dir}/MP3ADUdescriptor.cpp
                ${${temp_}dir}/MP3ADUinterleaving.cpp
                ${${temp_}dir}/MP3ADURTPSink.cpp
                ${${temp_}dir}/MP3AudioFileServerMediaSubsession.cpp
                ${${temp_}dir}/MP3AudioMatroskaFileServerMediaSubsession.cpp
                ${${temp_}dir}/MP3FileSource.cpp
                ${${temp_}dir}/MP3InternalsHuffmanTable.cpp
                ${${temp_}dir}/MP3StreamState.cpp
                ${${temp_}dir}/MP3Transcoder.cpp
                ${${temp_}dir}/MPEG1or2Demux.cpp
                ${${temp_}dir}/MPEG1or2DemuxedElementaryStream.cpp
                ${${temp_}dir}/MPEG1or2DemuxedServerMediaSubsession.cpp
                ${${temp_}dir}/MPEG1or2FileServerDemux.cpp
                ${${temp_}dir}/MPEG1or2VideoRTPSink.cpp
                ${${temp_}dir}/MPEG1or2VideoRTPSource.cpp
                ${${temp_}dir}/MPEG1or2VideoStreamDiscreteFramer.cpp
                ${${temp_}dir}/MPEG1or2VideoStreamFramer.cpp
                ${${temp_}dir}/MPEG2IndexFromTransportStream.cpp
                ${${temp_}dir}/MPEG2TransportStreamAccumulator.cpp
                ${${temp_}dir}/MPEG2TransportStreamDemux.cpp
                ${${temp_}dir}/MPEG2TransportStreamDemuxedTrack.cpp
                ${${temp_}dir}/MPEG2TransportStreamFramer.cpp
                ${${temp_}dir}/MPEG2TransportStreamFromESSource.cpp
                ${${temp_}dir}/MPEG2TransportStreamFromPESSource.cpp
                ${${temp_}dir}/MPEG2TransportStreamMultiplexor.cpp
                ${${temp_}dir}/MPEG2TransportStreamParser.cpp
                ${${temp_}dir}/MPEG2TransportStreamParser_PAT.cpp
                ${${temp_}dir}/MPEG2TransportStreamParser_PMT.cpp
                ${${temp_}dir}/MPEG2TransportStreamParser_STREAM.cpp
                ${${temp_}dir}/MPEG2TransportStreamTrickModeFilter.cpp
                ${${temp_}dir}/MPEG2TransportUDPServerMediaSubsession.cpp
                ${${temp_}dir}/MPEG4ESVideoRTPSink.cpp
                ${${temp_}dir}/MPEG4ESVideoRTPSource.cpp
                ${${temp_}dir}/MPEG4GenericRTPSink.cpp
                ${${temp_}dir}/MPEGVideoStreamParser.cpp
                ${${temp_}dir}/OggFile.cpp
                ${${temp_}dir}/OggFileServerDemux.cpp
                ${${temp_}dir}/ourMD5.cpp
                ${${temp_}dir}/OutputFile.cpp
                ${${temp_}dir}/QCELPAudioRTPSource.cpp
                ${${temp_}dir}/QuickTimeFileSink.cpp
                ${${temp_}dir}/QuickTimeGenericRTPSource.cpp
                ${${temp_}dir}/RawVideoRTPSource.cpp
                ${${temp_}dir}/RTCP.cpp
                ${${temp_}dir}/RTPInterface.cpp
                ${${temp_}dir}/RTPSink.cpp
                ${${temp_}dir}/RTPSource.cpp
                ${${temp_}dir}/RTSPCommon.cpp
                ${${temp_}dir}/RTSPRegisterSender.cpp
                ${${temp_}dir}/RTSPServer.cpp
                ${${temp_}dir}/ServerMediaSession.cpp
                ${${temp_}dir}/SIPClient.cpp
                ${${temp_}dir}/StreamParser.cpp
                ${${temp_}dir}/StreamReplicator.cpp
                ${${temp_}dir}/T140TextRTPSink.cpp
                ${${temp_}dir}/TextRTPSink.cpp
                ${${temp_}dir}/TheoraVideoRTPSink.cpp
                ${${temp_}dir}/TheoraVideoRTPSource.cpp
                ${${temp_}dir}/TLSState.cpp
                ${${temp_}dir}/uLawAudioFilter.cpp
                ${${temp_}dir}/VorbisAudioRTPSink.cpp
                ${${temp_}dir}/VP8VideoRTPSink.cpp
                ${${temp_}dir}/VP8VideoRTPSource.cpp
                ${${temp_}dir}/VP9VideoRTPSink.cpp
                ${${temp_}dir}/VP9VideoRTPSource.cpp
                ${${temp_}dir}/WAVAudioFileServerMediaSubsession.cpp
                ${${temp_}dir}/WAVAudioFileSource.cpp
                ${${temp_}dir}/AC3AudioRTPSource.cpp
                ${${temp_}dir}/AC3AudioStreamFramer.cpp
                ${${temp_}dir}/ADTSAudioStreamDiscreteFramer.cpp
                ${${temp_}dir}/AMRAudioRTPSink.cpp
                ${${temp_}dir}/AVIFileSink.cpp
                ${${temp_}dir}/BitVector.cpp
                ${${temp_}dir}/ByteStreamMemoryBufferSource.cpp
                ${${temp_}dir}/DeviceSource.cpp
                ${${temp_}dir}/DVVideoFileServerMediaSubsession.cpp
                ${${temp_}dir}/DVVideoRTPSource.cpp
                ${${temp_}dir}/FileServerMediaSubsession.cpp
                ${${temp_}dir}/FileSink.cpp
                ${${temp_}dir}/H263plusVideoStreamFramer.cpp
                ${${temp_}dir}/H263plusVideoStreamParser.cpp
                ${${temp_}dir}/H265VideoFileSink.cpp
                ${${temp_}dir}/H265VideoRTPSource.cpp
                ${${temp_}dir}/InputFile.cpp
                ${${temp_}dir}/JPEG2000VideoRTPSource.cpp
                ${${temp_}dir}/MatroskaFileServerDemux.cpp
                ${${temp_}dir}/MatroskaFileServerMediaSubsession.cpp
                ${${temp_}dir}/MIKEY.cpp
                ${${temp_}dir}/MP3ADU.cpp
                ${${temp_}dir}/MP3ADURTPSource.cpp
                ${${temp_}dir}/MP3ADUTranscoder.cpp
                ${${temp_}dir}/MP3Internals.cpp
                ${${temp_}dir}/MP3InternalsHuffman.cpp
                ${${temp_}dir}/MPEG1or2AudioRTPSink.cpp
                ${${temp_}dir}/MPEG1or2AudioRTPSource.cpp
                ${${temp_}dir}/MPEG1or2AudioStreamFramer.cpp
                ${${temp_}dir}/MPEG1or2VideoFileServerMediaSubsession.cpp
                ${${temp_}dir}/MPEG2TransportFileServerMediaSubsession.cpp
                ${${temp_}dir}/MPEG2TransportStreamIndexFile.cpp
                ${${temp_}dir}/MPEG4GenericRTPSource.cpp
                ${${temp_}dir}/MPEG4LATMAudioRTPSink.cpp
                ${${temp_}dir}/MPEG4LATMAudioRTPSource.cpp
                ${${temp_}dir}/MPEG4VideoFileServerMediaSubsession.cpp
                ${${temp_}dir}/MPEG4VideoStreamDiscreteFramer.cpp
                ${${temp_}dir}/MPEG4VideoStreamFramer.cpp
                ${${temp_}dir}/MPEGVideoStreamFramer.cpp
                ${${temp_}dir}/MultiFramedRTPSink.cpp
                ${${temp_}dir}/MultiFramedRTPSource.cpp
                ${${temp_}dir}/OggDemuxedTrack.cpp
                ${${temp_}dir}/OggFileParser.cpp
                ${${temp_}dir}/OggFileServerMediaSubsession.cpp
                ${${temp_}dir}/OggFileSink.cpp
                ${${temp_}dir}/OnDemandServerMediaSubsession.cpp
                ${${temp_}dir}/PassiveServerMediaSubsession.cpp
                ${${temp_}dir}/ProxyServerMediaSession.cpp
                ${${temp_}dir}/RawVideoRTPSink.cpp
                ${${temp_}dir}/rtcp_from_spec.c
                ${${temp_}dir}/RTSPClient.cpp
                ${${temp_}dir}/RTSPServerRegister.cpp
                ${${temp_}dir}/SimpleRTPSink.cpp
                ${${temp_}dir}/SimpleRTPSource.cpp
                ${${temp_}dir}/SRTPCryptographicContext.cpp
                ${${temp_}dir}/VideoRTPSink.cpp
                ${${temp_}dir}/VorbisAudioRTPSource.cpp)
list(APPEND prg01_src ${${temp_}src})
list(APPEND prg01_inc_dir ${${temp_}dir}/include)
list(APPEND prg01_inc_dir ${${temp_}dir}/)


set(temp_ media_server_)
set(${temp_}dir mediaServer)
set(${temp_}src ${${temp_}dir}/DynamicRTSPServer.cpp
                ${${temp_}dir}/live555MediaServer.cpp)
list(APPEND prg01_src ${${temp_}src})
list(APPEND prg01_inc_dir ${${temp_}dir}/include)



set(temp_ usge_env_)
set(${temp_}dir UsageEnvironment)
set(${temp_}src ${${temp_}dir}/HashTable.cpp
                ${${temp_}dir}/strDup.cpp
                ${${temp_}dir}/UsageEnvironment.cpp)
list(APPEND prg01_src ${${temp_}src})
list(APPEND prg01_inc_dir ${${temp_}dir}/include)



# set(temp_ )
# set(${temp_}dir )
# set(${temp_}src )
# list(APPEND prg01_src ${${temp_}src})
# list(APPEND prg01_inc_dir ${${temp_}dir}/include)

add_executable(${prg01_name} ${prg01_src})
target_include_directories(${prg01_name} ${prg01_inc_dir})
target_link_libraries(${prg01_name} zlog pthread jsoncpp ssl crypto)

#添加子目录,这样进入源码文件src目录可以继续构建  
# add_subdirectory(${PROJECT_SOURCE_DIR}/src)  
 